/**
 * 
 * @author Tran
 *
 */

import java.awt.*;
import javax.swing.*;
/*
 * This is the basic template for all buttons
 * the program uses
 */

public class blankButton extends JButton
{
	//
	ImageIcon img;
	String text;
	public blankButton(String txt)
	{
		//
		img = new ImageIcon(txt);
		text = txt;
		
		setPreferredSize(new Dimension(190, 30));
		setMinimumSize(new Dimension (190, 30));
	}
	
	public void paintComponent(Graphics g)
	{
		super.paintComponent(g);
		Graphics2D g2 = (Graphics2D) g;
		ImageIcon p = new ImageIcon("blankButton.png");
		
		Paint oldPain = g2.getPaint();
		g2.drawImage(p.getImage(), 0, 0, null);
		g2.drawString(text, (190 - text.length()*6)/2, 20);
	}
}
